package com.gewu.pm.ui.adapter.home;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.gewu.pm.R;
import com.gewu.pm.app.AppAdapter;
import com.gewu.pm.bean.TestBean;

/**
 * 商品销售分析表
 */
public class ReportGoodsSalesAdapter extends AppAdapter<TestBean> {
    public ReportGoodsSalesAdapter(Context context) {
        super(context);
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new ItemViewHolder();
    }

    private final class ItemViewHolder extends AppAdapter<?>.ViewHolder {

        private final TextView mTitleView;
        private final TextView tvDrillSown;//单据明细

        private ItemViewHolder() {
            super(R.layout.goods_drilling_item);
            mTitleView = findViewById(R.id.tv_title);
            tvDrillSown = findViewById(R.id.tv_drill_down);

        }

        @Override
        public void onBindView(int position) {
            TestBean item = getItem(position);

            mTitleView.setText(item.getName());
            tvDrillSown.setVisibility(View.INVISIBLE);

        }
    }
}
